/**
 * <p>Copyright: Copyright (c) 2014</p>
 * <p>Company: ---Technology Co. Ltd</p>
 * <p>2014-5-6</p>
 * @author Jan.Zhang
 */
package com.xianl.busiplat.service.impl;

import java.util.List;
import com.xianl.busiplat.dao.BaseDao;
import com.xianl.busiplat.dao.RolePermissionDao;
import com.xianl.busiplat.po.RolePermission;
import com.xianl.busiplat.service.RolePermissionService;


/** 
 * desc:
 * <p>author: Jan.Zhang </p>
 * date: 2014-5-6
 */
public class RolePermissionServiceImpl extends BaseServiceImpl<RolePermission> implements RolePermissionService {

	private RolePermissionDao mapper;
	
	/* 
	 * desc:
	 * @see com.umpay.sc.plat.core.service.RolePermissionService#findPermissions(java.lang.Integer)
	 */
	@Override
	public List<String> findPermissions(Integer roleId) {
		return mapper.findPermissions(roleId);
	}
	
	/* 
	 * desc:
	 * @see com.umpay.sc.plat.core.service.impl.BaseServiceImpl#setMapper(com.umpay.sc.plat.core.mapper.BaseMapper)
	 */
	@Override
	public void setMapper(BaseDao<RolePermission> mapper) {
		super.setMapper(mapper);
		this.mapper = (RolePermissionDao) mapper;
	}

	/* 
	 * desc:
	 * @see com.umpay.sc.plat.core.service.RolePermissionService#deletePermissionsByRoleId(java.lang.Integer)
	 */
	@Override
	public void deletePermissionsByRoleId(Integer roleId) {
		RolePermission p = new RolePermission();
		p.setRoleId(roleId);
		this.mapper.delete(p);
		
	}
	
	
}
